﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Shapes;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace mat2tab_fun.functionPlots
{
    class FunctionPlot
    {
        protected List<Line> lines;
        private Grid plotGrid;
        protected double halfX;
        protected double halfY;
        private bool testMonotonicznosci;

        public FunctionPlot()
        {
            lines = new List<Line>(); // lew
            halfX = plotGrid.ActualWidth / 2;
            halfY = plotGrid.ActualHeight / 2;
        }

        public FunctionPlot(bool testMonotonicznosci, Grid plotGrid, int size)
        {
            lines = new List<Line>();
            this.plotGrid = plotGrid;
            this.testMonotonicznosci = testMonotonicznosci;
            halfX = plotGrid.ActualWidth / 2;
            halfY = plotGrid.ActualHeight / 2;
        }

        public FunctionPlot(List<Line> lines, Grid plotGrid, int size)
        {
            this.lines = lines;
            this.plotGrid = plotGrid;
            this.DrawPlot();
        }

        protected void DrawPlot()
        {
            foreach (Line l in lines)
            {
                l.StrokeThickness = 2;
                plotGrid.Children.Add(l);
            }
        }
    }
}
